/* 
 * File:   Par_RothC_Pool_Fraction_Distibut.h
 * Author: dechow
 *
 * Created on 7. Juni 2011, 19:33
 */

#ifndef PAR_MAPS_H
#define	PAR_MAPS_H
//#include "stdafx.h"
using namespace std;
class Par_Maps
{
    map<const string,vector<double> > mymap;
public:
    Par_Maps(string root,string name,string suffix)
    {
        mymap=Basics_vmap::read_vector_map(root,name,suffix);
    }
    Par_Maps()
    {
          ;
    }
    int read_Par_Maps(string root, string name,string suffix)
    {
        
        mymap=Basics_vmap::read_vector_map(root,name,suffix);
        return 0;
    }
    double get_val(string col_id,unsigned int row_id)
    {
                if(mymap.find(col_id)==mymap.end()) err::err3("Par_Maps:: get_val: variable name is unknown:"+col_id);
                if(row_id>mymap[col_id].size()-1)err::err2("Par_Maps:: get_val:row_id is out of range.");
                return mymap[col_id][row_id];
    }
};


#endif	/* PAR_ROTHC_POOL_FRACTION_DISTIBUT_H */

